SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE VIEW dbo.vwtareasexteriores
AS
SELECT     dbo.u_f1_06_areasexteriores.Id AS ID, dbo.u_f1_06_areasexteriores.idCui, dbo.u_f1_06_areasexteriores.superficie, 
                      dbo.u_f1_06_areasexteriores.numIdentific, dbo.u_tp_areas_exteriores.descripcion AS Area, dbo.u_tp_terminacionpiso.descripcion AS Terminacion, 
                      dbo.u_tp_estado.descripcion AS Estado
FROM         dbo.u_tp_estado RIGHT OUTER JOIN
                      dbo.u_f1_06_areasexteriores ON dbo.u_tp_estado.Id = dbo.u_f1_06_areasexteriores.idEstado LEFT OUTER JOIN
                      dbo.u_tp_areas_exteriores ON dbo.u_f1_06_areasexteriores.idTipoAreaExterior = dbo.u_tp_areas_exteriores.Id LEFT OUTER JOIN
                      dbo.u_fg_00_varios ON dbo.u_f1_06_areasexteriores.idCui = dbo.u_fg_00_varios.idCui LEFT OUTER JOIN
                      dbo.u_tp_terminacionpiso ON dbo.u_f1_06_areasexteriores.idEstado = dbo.u_tp_terminacionpiso.id
GO
GRANT SELECT ON  [dbo].[vwtareasexteriores] TO [Cenie]
GO
